//
//  MTCancleView.m
//  met
//
//  Created by 李晓俊 on 2019/5/11.
//  Copyright © 2019 李晓俊. All rights reserved.
//

#import "MTCancleView.h"

@implementation MTCancleView
{
    
    CGRect myframe;
    
}
- (MTCancleView  *)initWithFrame:(CGRect)frame

{
    self = [super initWithFrame:frame];
    if (self) {
        NSArray *nibs=[[NSBundle mainBundle]loadNibNamed:@"MTCancleView" owner:nil options:nil];
        self=[nibs objectAtIndex:0];
        myframe = frame;
        
        self.cancleBut.layer.borderWidth = 2;
        self.cancleBut.layer.borderColor = KBlackColor.CGColor;
        self.sureBut.layer.borderWidth = 2;
        self.sureBut.layer.borderColor = KBlackColor.CGColor;
    }
    return self;
}
-(void)drawRect:(CGRect)rect

{
    self.frame=myframe;//关键点在这里
}
- (IBAction)cancleClick:(id)sender {
    if (self.cancle) {
        self.cancle(@"1");
    }
}
- (IBAction)sureClick:(id)sender {
    if (self.done) {
        self.done(@"1");
    }
}

@end
